// MineGUI.h

#ifndef MINENGUI_H
#define MINENGUI_H

#include "MineUIInterface.h"

/**
* Class that handles the IO of a MineSweeper game.
* It is purely textbased (i.e. terminal).
*/
class MineNGUI : public MineUIInterface
{
public:
	/**
	* Constructor.
	*
	* @param grid a pointer to the model to be used.
	*/
	MineNGUI( ObserverMineGrid *mines );

	/**
	* Destructor.
	*/
	~MineNGUI();

	/**
	* Returns an action according to the input.
	*
	* @return char the action on the MineGrid.
	*/
	virtual char getAction() const;

	/**
	* Returns a point according to the input.
	*
	* @return Point a point to a mine.
	*/
	virtual Point getPoint() const;

	/**
	* Clear the input buffer.
	*/
	void clearInputBuffer() const;

	/**
	* Prints out the games ui.
	*/
	void printUI() const;

	/**
	* Update the observable.
	*/
	virtual void notify();

private:
	 /**
	 * Prints the mines.
	 */
	void printMines() const;

	 /**
	 * Prints the current time of the game.
	 */
	 void printTime() const;
};

#endif // MINENGUI_H
